<html>
    <?php use_javascript('jquery-1.7.1.min.js') ?>
    <?php use_helper('JQuery')?>
<script type="text/javascript">
$(document).ready(function(){
      $("#enlaceajax").click(function(evento){
      $("#ajaxmodal").css({"display":"inline","position":"fixed","width":"180%","background":"rgba(0,0,0,.8)","height":"180%","background:":"#000000","z-index":"100","top":"0","left":"0"});
      $("#imageajax").css({"display": "inline","position":"absolute","top":"200px","left":"50%","width":"650px","height":"100px","display": "inline","margin-left":"-950px","margin-right":"-300px","background":"#f7fbfc","z-index":"101","padding":"30px 40px 34px"});
      
      
      $().reload("<?php echo url_for('Proyectos/index')?>", function(){

         $("#ajaxmodal").css("display", "none");
         $("#imageajax").css("display", "none");
     
      });

   });
  
   $("#enlacevalores").click(function(evento){
      $("#ajaxmodal").css({"display":"inline","position":"fixed","width":"180%","background":"rgba(0,0,0,.8)","height":"180%","background:":"#000000","z-index":"100","top":"0","left":"0"});
      $("#imageajax").css({"display": "inline","position":"absolute","top":"200px","left":"50%","width":"650px","height":"100px","display": "inline","margin-left":"-950px","margin-right":"-300px","background":"#f7fbfc","z-index":"101","padding":"30px 40px 34px"});
      
      
      $().reload("<?php echo url_for('valores/index')?>", function(){

         $("#ajaxmodal").css("display", "none");
         $("#imageajax").css("display", "none");
     
      });

   });
   
   $("#enlaceayuda").click(function(evento){
      $("#ajaxmodal").css({"display":"inline","position":"fixed","width":"180%","background":"rgba(0,0,0,.8)","height":"180%","background:":"#000000","z-index":"100","top":"0","left":"0"});
      $("#imageajax").css({"display": "inline","position":"absolute","top":"200px","left":"50%","width":"650px","height":"100px","display": "inline","margin-left":"-950px","margin-right":"-300px","background":"#f7fbfc","z-index":"101","padding":"30px 40px 34px"});
      
      
      $().reload("<?php echo url_for('Ayuda/index')?>", function(){

         $("#ajaxmodal").css("display", "none");
         $("#imageajax").css("display", "none");
     
      });

   });
   
});
</script>

    <div  id="titulos" align="center"><h1>Bienvenido al <b>Sistema web de Gesti&oacute;n de Presupuestos</b></h1> </div><br>
    <div id="cajaprincipal" align="center">
        <div id="cajamenu" align="center">    
            
            <br>

            <div id="barra-lateral">
                <?php $id = $this->user = sfContext::getInstance()->getUser()->getGuardUser()->getId() ?> 
                <a href="#" class="big-link" data-reveal-id="editusermodal"><div class="button button-green"><span><div class="spritesactualizarinfo" id="user1_jpg" align="center"></div>Actualizar Informaci&oacute;n de Usuario</span></div></a><br><br>
                <a href="#" class="big-link" data-reveal-id="showusermodal"><div class="button button-green"><span><div class="spritesinfouser" id="privatemail_jpg" align="center"></div>Informaci&oacute;n de Usuario</span></div></a><br><br>
                <a href="<?php echo url_for('cambiocontra/edit?id=' . $id) ?>"><div class="button button-green"><span><div class="spritesclave" id="Cambiar-Pass_jpg" align="center"></div>Cambiar Contrase&ntilde;a</span></div></a><br><br>
                <a href="<?php echo url_for('ayuda/index') ?>" id="enlaceayuda"><div class="button button-green"><span><div class="spritesayuda" id="Cute-Ball-Help-icon_jpg" align="center"></div>Ayuda</span></div></a><br><br>

            </div>
            <div id="barra-lateral2">
                <a href="<?php echo url_for('proyectos/index') ?>" id="enlaceajax"><div class="button button-black"><span><div class="spritesproyectos" id="Red-Clean_jpg" align="center"></div>Administrar Proyectos (Paso 1)</span></div></a><br><br>             
    <!--            <a href="<?php echo url_for('detalle/index') ?>"><div class="button button-green"><span><div class="spritesdetalles" id="detallesproyecto_jpg" align="center"></div>Detalles Proyectos</span></div></a><br><br> -->
                <a href="#" class="big-link" data-reveal-id="questionmodal" ><div class="button button-green"><span><div class="spritesdetalles" id="detallesproyecto_jpg" align="center"></div>Detalles Proyectos</span></div></a><br><br>


                <a href="<?php echo url_for('valores/index') ?>" id="enlacevalores"><div class="button2 button-black"><span><div class="spritesreports" id="reports-icon_jpg" align="center"></div>Administrar Montos de Entidades Financieras <b>(Paso 6)</b></span></div></a><br><br>   
          
          </div>
            <div id="contenedorimagen" align="center">
                <div class="sprites1" id="fondoproyecto2_gif" align="center">
                </div>
            </div> 

        </div><br><br><br>
    </div>
    <div id="ajaxmodal" style="display: none;">
    <div id="imageajax" style="display: none;">
        <b>Cargando, Por favor Espere unos minutos</b><br><br>
        <?php echo image_tag('ajax-loader.gif');?>
</div>    
</div>
    <!--</div>-->
    <div id="editusermodal" class="reveal-modal">
        <div align="center"><h1>Actualizar Informaci&oacute;n Personal</h1></div><br></br>
        <div id="fondos" align="center"><br>
            <?php foreach ($usuario as $sfguarduser): ?>
                <?php if ($this->user = sfContext::getInstance()->getUser()->getGuardUser()->getId() == $sfguarduser->getId()) { ?>  
                    <table>
                        <tbody>

                            <tr>
                                <th><b>Nombres:</b></th>
                                <td>&nbsp;<?php echo $sfguarduser->getFirstName() ?></td>
                            </tr>
                            <tr>
                                <th><b>Apellidos:</b></th>
                                <td>&nbsp;<?php echo $sfguarduser->getLastName() ?></td>
                            </tr>
                            <tr>
                                <th><b>Direcci&oacute;n de email:</b></th>
                                <td>&nbsp;<?php echo $sfguarduser->getEmailAddress() ?></td>
                            </tr>
                            <tr>
                                <th><b>Sexo:</b></th>
                                <?php if ($sfguarduser->getSexo() == 0) { ?>
                                    <td>&nbsp;Masculino</td>
                                <?php } else { ?>
                                    <td>&nbsp;Femenino</td>
                                <?php } ?>
                            </tr>
                            <tr>
                                <th><b>Direccion:</b></th>
                                <td>&nbsp;<?php echo $sfguarduser->getDireccion() ?></td>
                            </tr>
                            <tr>
                                <th><b>Telefono:</b></th>
                                <td>&nbsp;<?php echo $sfguarduser->getTelefono() ?></td>
                            </tr>
                            <tr>
                                <th><b>Telefono movil:</b></th>
                                <td>&nbsp;<?php echo $sfguarduser->getTelefonoMovil() ?></td>
                            </tr>

                        </tbody>
                    </table>
                <?php } ?>      
            <?php endforeach; ?><br>
        </div><br>
        <a href="<?php echo url_for('usuario/edit?id=' . $this->user = sfContext::getInstance()->getUser()->getGuardUser()->getId()) ?>"><button class="buttonmediumauto button-green"><span><div id="imagenes" valign="middle"><div class="spriteseditsmall" id="edit-iconsmall_jpg" align="center"></div></div><div id="textobutton2">Editar</div></span></button></a>&nbsp;&nbsp;
        <a href="#" class="close-reveal-modal"><button class="buttonmedium button-green"><span><div id="imagenes" valign="center"><div class="spritesatrasmall" id="atrasmall_jpg" align="center"></div></div><div id="textobutton2">Menu Principal</div></span></button></a>
    </div>
    <div id="showusermodal" class="reveal-modal">
        <div align="center"><h1>Informaci&oacute;n Personal</h1></div><br></br>
        <div id="fondos" align="center"><br> 
            <?php foreach ($usuario as $sfguarduser): ?>
                <?php if ($this->user = sfContext::getInstance()->getUser()->getGuardUser()->getId() == $sfguarduser->getId()) { ?>  
                    <table>
                        <tbody>

                            <tr>
                                <th><b>Nombres:</b></th>
                                <td>&nbsp;<?php echo $sfguarduser->getFirstName() ?></td>
                            </tr>
                            <tr>
                                <th><b>Apellidos:</b></th>
                                <td>&nbsp;<?php echo $sfguarduser->getLastName() ?></td>
                            </tr>
                            <tr>
                                <th><b>Direcci&oacute;n de email:</b></th>
                                <td>&nbsp;<?php echo $sfguarduser->getEmailAddress() ?></td>
                            </tr>
                            <tr>
                                <th><b>Sexo:</b></th>
                                <?php if ($sfguarduser->getSexo() == 0) { ?>
                                    <td>&nbsp;Masculino</td>
                                <?php } else { ?>
                                    <td>&nbsp;Femenino</td>
                                <?php } ?>
                            </tr>
                            <tr>
                                <th><b>Direccion:</b></th>
                                <td>&nbsp;<?php echo $sfguarduser->getDireccion() ?></td>
                            </tr>
                            <tr>
                                <th><b>Telefono:</b></th>
                                <td>&nbsp;<?php echo $sfguarduser->getTelefono() ?></td>
                            </tr>
                            <tr>
                                <th><b>Telefono movil:</b></th>
                                <td>&nbsp;<?php echo $sfguarduser->getTelefonoMovil() ?></td>
                            </tr>

                        </tbody>
                    </table>
                <?php } ?>  
            <?php endforeach; ?><br>
        </div><br>
        <div id="cajachica" align="center"> 
            <a href="#" class="close-reveal-modal"><button class="buttonmediumauto button-green"><span><div id="imagenes" valign="middle"><div class="spritesoksmall" id="ok2small_jpg" align="center"></div></div><div id="textobutton2">Aceptar</div></span></button></a>   
        </div>
        <br><br>
    </div>



    <div id="questionmodal" class="reveal-modal2">

        <div  align="center"><h1>Detalles de Proyectos</h1></div><br>
        
            <div id="detallesproyecto" align="center"><br>
                <table class="table" align="center" id="contextualdetalles" border="1">
                    <thead>
                        <tr id="filascolor">
                            <th>Nombre</th>
                            <th colspan="2">Opciones</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php foreach ($proyectos as $proyecto): ?>
                            <tr >
                                <?php if ($proyecto->getIdUser() == $this->user = sfContext::getInstance()->getUser()->getGuardUser()->getId()) { ?>
                                    <?php if ($proyecto->getEstado() == 0) { ?>
                                <td id="contextual"><?php echo $proyecto->getNombre() ?></td>                         
                                        <?php foreach ($fondos as $fondo): ?>
                                            <?php if ($fondo->getIdPro() == $proyecto->getIdPro()) { ?>
                                                <?php if ($fondo->getDefecto() == 1) { ?>
                                                    
                                                    <td id="contextual"><a href="<?php echo url_for('detalle/CronogramaFondo?id_fo=' . $fondo->getIdFo()) ?>"><div class="button button-green"><span><div class="spritesportafoliofondo" id="portafoliofondo_jpg" align="center"></div>Detalle Entidad <?php echo strtoupper($fondo->getSiglasInst()) ?></span></div></a></td>                                                            
                                                <?php } else { ?>    
                                                    
                                                    <td id="contextual"><a href="<?php echo url_for('detalle/CronogramaFondo?id_fo=' . $fondo->getIdFo()) ?>"><div class="button button-green"><span><div class="spriteseditarfondo" id="editarfondos_jpg" align="center"></div>Detalle Entidad <?php echo strtoupper($fondo->getSiglasInst()) ?></span></div></a></td>                                                
                                                <?php } ?> 
                                            <?php } ?> 
                                        <?php endforeach; ?>                       
                                    <?php } ?>             
                                <?php } ?> 
                            </tr>
                        <?php endforeach; ?>
                    </tbody>
                </table><br>
            </div> 
           
    </div>



</html>